<?php
declare(strict_types = 1);
namespace vinchan\encryption\Code;

use vinchan\encryption\Kernel\CodeInterface;

class Base64 implements CodeInterface
{
	/**
	 * [base64解码数据]
	 * @param  string $data [description]
	 * @return [type]       [description]
	 */
	public function decode(string $data):string
	{
		return base64_decode($data);
	}

	/**
	 * [加码数据]
	 * @param  string $data [description]
	 * @return [type]       [description]
	 */
	public function encode(string $data):string
	{
		return base64_encode($data);
	}
}